package com.zhang.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  商品实体类
 */
@Data
@NoArgsConstructor
public class ProductBean {
    /**商品id*/
    private int productId;
    /**商品名*/
    private String productName;
    /**商品单价*/
    private int productPrice;
    /**商品产地*/
    private String productAddress;
    /**生产日期*/
    private String productTime;
    /**商品图*/
    private String imgPath;
    /**已售数量*/
    private int num;
    /**状态*/
    private String status = "上架";

    public ProductBean(String productName, int productPrice, String productAddress, String productTime, String imgPath) {
        this.productName = productName;
        this.productPrice = productPrice;
        this.productAddress = productAddress;
        this.productTime = productTime;
        this.imgPath = imgPath;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "productId=" + productId +
                ", productName='" + productName + '\'' +
                ", productPrice=" + productPrice +
                ", productAddress='" + productAddress + '\'' +
                ", productTime='" + productTime + '\'' +
                ", imgPath='" + imgPath + '\'' +
                '}' + "\n";
    }
}
